-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[DEPRECATE] registerPlugin / unregisterPlugin and legacy class based AST plugins
#19429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…sed AST plugins The usage of `registerPlugin`/`unregisterPlugin` **requires** global state mutation which leaks AST plugins between addon's and applications. Tools like Embroider and ember-cli-htmlbars have avoided this by ensuring that we purge the Node module caching system between each attempt at using the template compiler. This results in _massive_ memory growth (the entire `ember-template-compiler.js` source string is included in memory for each addon in the build, as well as any JIT artificats). This is **very _bad_**. This PR deprecates using `registerPlugin`/`unregisterPlugin` along with the legacy AST transform API. All of these APIs are private APIs (as is anything to do with the template compilation AST), but they are used fairly often so a proper deprecation cycle is useful.
|
ember-cli/ember-cli-htmlbars#661 should resolve the deprecation for ember-cli-htmlbars. |
|
For folks seeing the See https://github.com/ember-cli/ember-cli-htmlbars/releases/tag/v5.6.0 for more details. |
|
https://github.com/DockYard/ember-maybe-in-element also has this issue |
As noted in #4015, a registerPlugin deprecation is now caused by @sentry/ember because of the Ember version upgrade. As mentioned here, https://github.com/emberjs/ember.js/pull/19429\#issuecomment-786403885 updating htmlbars should fix this.
As noted in #4015, a registerPlugin deprecation is now caused by @sentry/ember because of the Ember version upgrade. As mentioned here, https://github.com/emberjs/ember.js/pull/19429\#issuecomment-786403885 updating htmlbars should fix this.

The usage of
registerPlugin/unregisterPluginrequires global state mutation which leaks AST plugins between addon's and applications. Tools like Embroider and ember-cli-htmlbars have avoided this by ensuring that we purge the Node module caching system between each attempt at using the template compiler. This results in massive memory growth (the entireember-template-compiler.jssource string is included in memory for each addon in the build, as well as any JIT artificats).This is very bad.
This PR deprecates using
registerPlugin/unregisterPluginalong with the legacy AST transform API. All of these APIs are private APIs (as is anything to do with the template compilation AST), but they are used fairly often so a proper deprecation cycle is useful.Related: